package ${cfg.dtoPath};

import java.util.Date;
import java.math.BigDecimal;
import com.book.common.util.DatetimeUtil;
import java.io.Serializable;
import lombok.Data;
import com.book.common.api.dto.BaseDto;
import org.springframework.format.annotation.DateTimeFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * Description：${table.comment!} Dto
 * @Author： ${author}
 * @CreateDate： ${date}
 * @Email： ${cfg.email}
 * Version: ${cfg.version}
 */
@Data
@ApiModel(value = "${table.entityName}Dto", discriminator = "${table.comment!}Dto", subTypes = {${table.entityName}Dto.class})
public class ${table.entityName}Dto extends BaseDto implements Serializable {
<#if entitySerialVersionUID>
    private static final long serialVersionUID = 1L;
</#if>
<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list table.fields as field>
    <#if field.propertyName!="status" && field.propertyName!="remarks" && field.propertyName!="version" && field.propertyName!="createBy" && field.propertyName!="createDate" && field.propertyName!="createName"  && field.propertyName!="updateName" && field.propertyName!="updateBy" && field.propertyName!="updateDate">
    @ApiModelProperty(value = "${field.comment}")
        <#if field.propertyType == "LocalDateTime">
    @DateTimeFormat(pattern = DatetimeUtil.YYYY_MM_DD_HH_MM_SS_L_C)
    private Date ${field.propertyName};

        <#elseif field.propertyName!="id" && field.type == "decimal" || field.type == "numeric">
    private BigDecimal ${field.propertyName};

        <#else>
    private ${field.propertyType} ${field.propertyName};

        </#if>
    </#if>
</#list>
}
